home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-10 | 8.8 KB | 441 lines | [TEXT/MSWD] |
-
-
- % SNT.16.PIANO (grand piano)
- % ..........
-
-
- % Always print with a left margin value of zero!
-
-
- clear initgraphics
-
- % Is Palatino-Italic available on your machine?
-
- FontDirectory /Palatino-Italic known true eq {/blurbfont
- {/Palatino-Italic} def /blurbfontbold {/Palatino-BoldItalic}
- def}{/blurbfont {/Times-Italic} def/blurbfontbold
- {/Times-BoldItalic} def}ifelse
-
- % ...
-
- /header
- (Lancaster, Show & Tell, Example #16
- ____________________________) def
-
-
- /figtitle (Example sixteen --
- ) def
-
- /blurb1
-
- (No postscript show and tell could possibly be
- complete without a grand piano!
- ) def
-
- /blurb2
-
- (This is done in the highly conservative art
- style of a "printer's tradesman cut" and might
- be used for custom business cards.
- ) def
-
- /filljustify false def
- /specialkern 0.30 def
-
-
- %............
-
- % lj: xpos ypos linewidth (line string) lj.
-
-
- /lj{/textstring exch def /endoline exch def /ystart
- exch def /xstart exch def /endoline endoline xstart add def
- textstring stringwidth pop /printwidth
- exch def endoline printwidth sub xstart sub /justlength
- exch
- def /searchstring textstring def /spacecount 0 def
- /wordbreak
- ( ) def{searchstring wordbreak search{pop pop /searchstring
- exch def /spacecount spacecount 1 add def}{exit}ifelse}loop
- spacecount 0 eq{/spacecount 1 def}if filljustify false eq
- {/justlength 0 def}if justlength spacecount div /stretch
- exch def
- xstart ystart moveto stretch 0 32 specialkern 0
- textstring awidthshow clear}def
-
- %....
-
- % pj: define font, xpos, ypos, yinc. then (strings) pj
-
- /leadspace{/space ( ) def /spacecount 0 def{linestring
- space anchorsearch
- {/spacecount spacecount 1 add def pop /linestring exch def}
- {pop exit}
- ifelse}loop xpos ypos moveto spacecount{space show}repeat
- /widthadjust currentpoint pop xpos sub def}def
-
- /pj{/workstring exch def/cr (
- ) def /linestring ( ) def /lastparline{gsave leadspace
- /ypos ypos yinc sub
- def linestring show grestore}def /midparline {gsave
- leadspace currentpoint
- linewidth widthadjust sub linestring lj /ypos ypos yinc
- sub def grestore}def
- {workstring cr search{/linestring exch def pop /workstring
- exch def
- midparline}{/linestring exch def lastparline exit}ifelse}
- loop}def
-
- %.....
-
- blurbfontbold findfont [12 0 0 12 0 0] makefont
- setfont
-
- /filljustify false def
- /xpos 60 def
- /ypos 760 def
- /linewidth 400 def
- /yinc 9 def
- header pj
-
- /yinc 14 def
- blurbfontbold findfont [12 0 0 12 0 0] makefont
- setfont
-
- /filljustify false def
- /ypos 160 def
- % has special kern routine
- figtitle pj
-
- blurbfont findfont [13 0 0 13 0 0] makefont setfont
-
- blurb1 pj
- blurb2 pj
-
- % ///// FIRST INSET /////
-
- % is der piano
-
- save /snap exch def
-
-
- % curvetrace.p
- %...
-
-
- /curvetrace {/curvelist exch def tension 0 eq
- {/tension .000001 def} if
- curvelist length 3 div 1 sub cvi /#triads exch def
- /ptr 0 def firstpoint morepoint} def
-
- /tension 2.83 def % default value for best fit
- %/showtick false def % don't show points
- /ticklen 15 def % length of ticks
- /tickhead ticklen 4 div def
-
- /prvx { curvelist ptr 3 sub get } def
- /curx { curvelist ptr get } def
- /prvy { curvelist ptr 2 sub get } def
- /cury { curvelist ptr 1 add get } def
- /prva { curvelist ptr 1 sub get } def
- /cura { curvelist ptr 2 add get 180 sub} def
-
- /showtic1 { showtick true eq {gsave currentpoint newpath
- translate cura
- 180 add rotate ticklen neg 2 div 0 moveto ticklen 0 rlineto
- tickhead neg
- dup rlineto tickhead dup rlineto tickhead dup neg exch
- rlineto 0
- setlinewidth stroke 0 ticklen neg 2 div moveto 0 ticklen
- rlineto stroke
- grestore} if }def
-
- /firstpoint { curx cury moveto showtic1 /ptr ptr 3 add def
- }def
-
- /morepoint {#triads { curx prvx sub dup mul cury prvy
- sub dup mul add sqrt
- tension div /zdist exch def prva cos zdist mul prvx add
- prva sin zdist mul
- prvy add cura cos zdist mul curx add cura sin zdist mul
- cury add
- curx cury
- curveto showtic1 /ptr ptr 3 add def} repeat} def
-
- % ...
-
- % /// PIANO STARTS HERE ///
-
- /pedals{
-
- [276 375 -90 276 365 -90
- 276 365 0 305 365 0
- 305 365 90 305 375 90
- 305 375 180 276 375 180] ctf
-
- [297 366 -90 297 312 -90] ctb
- [280 366 -90 280 314 -90] cta
- [291 366 -90 291 312 -90] cta
- [293 316 55 321 345 55 ] cta
- [280 316 55 321 363 55 ] cta
- [280 354 -5 298 353 -5 ] ctd
-
- gsave
- 0 5 translate
-
- [270 307 90 270 310 90
- 270 310 5 278 312 5
- 278 312 -8 301 308 -8
- 301 308 -90 301 298 -90
- 301 298 -175 294 297 -175
- 294 297 90 294 302 90
- 294 302 170 270 307 170] ctf
- grestore
-
- gsave
- -0.5 5 translate
-
- [269 300 90 269 302 90
- 269 302 0 270 302 0
- 270 302 -90 270 300 -90
- 270 300 180 269 300 180] ctf
-
- grestore
-
- gsave
- 6 3.9 translate
-
- [269 300 90 269 302 90
- 269 302 0 270 302 0
- 270 302 -90 270 300 -90
- 270 300 180 269 300 180] ctf
-
- grestore
- gsave
- 10.5 2.9 translate
- [269 300 90 269 302 90
- 269 302 0 270 302 0
- 270 302 -90 270 300 -90
- 270 300 180 269 300 180] ctf
-
- grestore
-
- gsave
- 0.5 6 translate
- [284 296 90 284 299 90
- 284 299 -1 289 298 -1
- 289 298 -90 289 295 -90
- 289 295 1 284 296 1] ctf
- grestore
-
- [276 306 -1 289 304 -1] ctb
- [289 302 1 295 303 1] ctb
- } def
-
- /legs{
-
- [355 372 -90 355 367 -90
- 355 367 180 328 296 -90
-
- 328 296 0 330 296 0
- 330 296 -92 328 285 -92
- 328 285 180 320 285 180
- 320 285 92 318 296 92
- 318 296 0 320 296 0
-
- 321 296 90 296 367 180
- 296 367 90 296 372 90
- 296 372 0 355 372 0] ctf
-
- [370 377 -90 370 372 -90
- 370 372 180 310 372 180
- 310 372 5 370 377 5] ctf
-
- newpath
- 324 280 2.8 2.8 360 arc closepath
- 0 setgray 1 setlinewidth stroke
-
- %....leg 2...
-
- gsave
- 0.7 dup scale
- 300 180 translate
-
- [355 372 -90 355 367 -90
- 355 367 180 328 296 -90
-
- 328 296 0 330 296 0
- 330 296 -92 328 285 -92
- 328 285 180 320 285 180
- 320 285 92 318 296 92
- 318 296 0 320 296 0
-
- 321 296 90 296 367 180
- 296 367 90 296 372 90
- 296 372 0 355 372 0] ctf
- newpath
-
- 324 280 2.8 2.8 360 arc closepath
- 0 setgray 1 setlinewidth stroke
- grestore
-
- %....leg 3...
-
- gsave
- 0.74 dup scale
- 0 145 translate
-
- [355 372 -90 355 367 -90
- 355 367 180 328 296 -90
-
- 328 296 0 330 296 0
- 330 296 -92 328 285 -92
- 328 285 180 320 285 180
- 320 285 92 318 296 92
- 318 296 0 320 296 0
-
- 321 296 90 296 367 180
- 296 367 90 296 372 90
- 296 372 0 355 372 0] ctf
- newpath
-
- 324 280 2.8 2.8 360 arc closepath
- 0 setgray 1 setlinewidth stroke
- grestore
- clear
- } def
-
- /lidandbody{
-
- [290 442 45 367 522 45
- 367 522 -2 410 520 -2
- 410 520 -135 385 494 -135
-
- 385 494 -55
- 387 490 -23 472 465 -130 405 419 -155] ctf
-
- %..body..
-
- [405 419 0 467 420 0
- 467 420 -90 467 385 -90
- 467 385 -175 300 372 -175
- 300 372 90 300 447 90] ctf
-
- } def
-
- /keyboard {
-
- [300 372 177 207 379 177
- 207 379 90 207 393 90
- 207 393 20 225 407 75
- 225 407 180 221 407 180
- 221 407 90 221 417 90
- 221 417 -1 256 418 2
- 256 418 70 268 440 5 314 430 -120 303 412 -120] ctf
-
- %...whites...
- 1 setgray 1 setlinewidth
-
- % lid
-
- [292 442 45 365 519 45
- 365 519 7 391 512 -75
- 392 512 90 391 510 110 368 515 -178
- 368 515 -135 298 442 -135
- 298 442 180 292 442 180] ctfd
- [389 514 -75 385 495 -70] ctc
-
- } def
-
- /support{
- [355 497 45 360 503 45
- 360 503 -75 385 420 -75
- 385 420 180 379 420 180
- 379 420 106 355 497 106] ctfd
-
- [387 421 0 395 421 0
- 395 421 -95 394 392 -105 383 380 -150
- 383 380 88 387 397 90 387 420 90] ctfd
-
- %..right arm..
-
- [312 405 -110 308 390 -130 302 386 -170
- 303 385 -5 312 388 50 318 405 71
- 318 405 180 312 405 180] ctfd
- [304 373 90 304 384 90] ctc
-
- [308 412 0 313 412 0
- 313 412 -90 313 405 -90
- 313 405 180 308 405 180
- 308 405 90 308 412 90] ctfd
-
- %..left arm
-
- [222 415 0 227 415 0
- 227 415 -90 227 408 -90
- 227 408 180 222 408 180
- 222 408 90 222 415 90] ctfd
-
- [211 394 20 226 406 75
- 226 406 0 230 406 0
- 230 406 -95 211 394 180] ctfd
- } def
-
- /keyboardwhite{
-
- [219 385 177 298 378 177
- 298 378 90 298 386 90
- 298 386 -3 219 392 -3
- 219 392 -90 219 385 -90] ctfd
-
- [280 378 -3 295 377 -3] ctc
-
- %music stand/lid
-
- [375 415 5 307 417 5
- 307 417 -120 304 412 -120
- 304 412 4 375 415 4] ctfd
-
- % music stand
- [310 440 -15 315 431 -120 303 413 -120] ctc
- grestore
- clear} def
-
- /piano {
-
- 1 setlinecap
- 1 setlinejoin
- /tension 2.8 def
-
- /ctf {curvetrace gsave 0 setgray fill grestore
- 1 setlinewidth 0 setgray stroke}def
-
- /ctfd {curvetrace gsave 1 setgray fill grestore
- 1 setlinewidth 0 setgray stroke}def
-
- /ct {curvetrace stroke} def
- /cta {curvetrace 7 setlinewidth stroke} def
- /ctb {curvetrace 2 setlinewidth stroke} def
- /ctc {curvetrace 1 setgray stroke} def
- /ctd {curvetrace 4 setlinewidth stroke} def
-
- %/showtick true def
- /showtick false def
-
- gsave
- -100 -60 translate 1.2 dup scale
-
- pedals
- legs
- lidandbody
- keyboard
- support
- keyboardwhite
-
- } def
-
- piano
-
- showpage
-